package com.yunzhou.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserMessage {
    private Long messageId;
    private Long receivedUserId; // 接收人用户ID
    private Long articleId; // 文章ID
    private String articleTitle; // 文章标题
    private Long commentId; // 评论ID
    private Long sendUserId; // 发送人ID
    private String sendNickname; // 发送人昵称
    private Integer messageType; // 0:系统消息 1:评论 2:文章点赞 3:评论点赞 4:附件下载
    private String messageContent; // 消息内容
    private Integer status; // 1:未读 2:已读

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime; // 创建时间
}
